/*    */ package com.zimbra.cs.service;
/*    */ 
/*    */ import com.zimbra.common.mime.ContentType;
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.io.OutputStream;
/*    */ import javax.activation.DataSource;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class UploadDataSource
/*    */   implements DataSource
/*    */ {
/*    */   private FileUploadServlet.Upload mUpload;
/*    */   private ContentType mContentType;
/*    */   
/*    */   public UploadDataSource(FileUploadServlet.Upload up)
/*    */   {
/* 41 */     this.mUpload = up;
/*    */   }
/*    */   
/*    */   public void setContentType(ContentType ctype) {
/* 45 */     this.mContentType = ctype;
/*    */   }
/*    */   
/*    */   public String getContentType() {
/* 49 */     if (this.mContentType == null) {
/* 50 */       return new ContentType(this.mUpload.getContentType()).cleanup().toString();
/*    */     }
/* 52 */     return this.mContentType.cleanup().toString();
/*    */   }
/*    */   
/*    */   public InputStream getInputStream() throws IOException
/*    */   {
/* 57 */     return this.mUpload.getInputStream();
/*    */   }
/*    */   
/*    */   public String getName() {
/* 61 */     return this.mUpload.getName();
/*    */   }
/*    */   
/*    */   public OutputStream getOutputStream() {
/* 65 */     return null;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/UploadDataSource.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */